package design;

public class Client
{
    public static void main(String[] args)
    {
        int extrinsic = 22;

        Flyweight flyweightX = FlyweightFactory.getFlyweight("X");
        flyweightX.operate(++extrinsic);

        Flyweight flyweightRX = FlyweightFactory.getFlyweight("X");
        flyweightRX.operate(++extrinsic);

        Flyweight flyweightY = FlyweightFactory.getFlyweight("Y");
        flyweightY.operate(++extrinsic);

        Flyweight flyweight = new UnsharedConcreateFlyweight("X");
        flyweight.operate(++extrinsic);
    }
}
